package com.zzl.bonds.ticket.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.general.common.utils.DoubleSerialize;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 我的票据  我持有 转让中的 列表返回公用 返回对象
 *
 * @author : spp
 * @date : 2022/2/23 20:14
 */
@ApidocModel
@Data
public class CashTicketPage {

    @ApidocModelProperty(description = "主键")
    private String id;
    @ApidocModelProperty(description = "票据编号")
    private String ticketNo;
    @ApidocModelProperty(description = "开单方id")
    private Integer openEnterpriseId;
    @ApidocModelProperty(description = "开单方企业名称")
    private String openEnterpriseName;

    @ApidocModelProperty(description = "收单单位id")
    private String enterpriseId;
    @ApidocModelProperty(description = "收单企业名称")
    private String enterpriseName;

    @JsonSerialize(using = DoubleSerialize.class)
    @ApidocModelProperty(description = "凭证金额")
    private Double ticketAllAmount;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApidocModelProperty(description = "开单日期", validate = "yyyy-MM-dd")
    private Date invoiceTime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApidocModelProperty(description = "到期日期", validate = "yyyy-MM-dd")
    private Date cashTime;

    @ApidocModelProperty(description = "剩余兑付天数")
    private String surplusCashingDays;

    private Integer ticketSource;

    @ApidocModelProperty(description = "票据来源,1:自建")
    private String ticketSourceStr;

    private Integer ticketStatus;

    @ApidocModelProperty(description = "凭证状态")
    private String ticketStatusStr;

    private Integer cashStatus;

    private Integer frozenState;

    @ApidocModelProperty(description = "上一级票的id,票的来源 我的票据的 主键")
    private String parentId;

    @ApidocModelProperty(description = "操作按钮集合")
    private List<KeyValue> operateButton;
}
